home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_400 / 422_03 / pcutils.doc < prev    next >
Encoding:
Text File  |  1994-02-14  |  49.0 KB  |  1,378 lines

  1.    
  2.    
  3.    
  4.    
  5.    
  6.    
  7.    
  8.    
  9.    
  10.    
  11.    
  12.    
  13.    
  14.    
  15.    
  16.    
  17.    
  18.    
  19.    
  20.    
  21.                                      P C
  22.                                   Utilities
  23.    
  24.                                A set of useful
  25.                                Utility Programs
  26.                                    For the
  27.                             IBM Personal Computer
  28.    
  29.    
  30.    
  31.    
  32.    
  33.                                  Release 1.3
  34.    
  35.                               Revised: 29-Jul-90
  36.    
  37.    
  38.    
  39.    
  40.    
  41.    
  42.    
  43.    
  44.    
  45.    
  46.                       Copyright 1983,1990 Dave Dunfield
  47.                              All rights Reserved
  48.    PC Utilities                                                     Page: 1
  49.  
  50.  
  51.    1. INTRODUCTION
  52.    
  53.          PC Utilities is a collection of small but useful utility  programs
  54.       for the IBM PC under MS-DOS.
  55.    
  56.          Included in the package are:
  57.    
  58.            CHATTR  - Change file attributes.
  59.            DIFF    - Compare two text files and report differences.
  60.            DR      - Scan a directory tree for OLDest and NEWest file
  61.            DUMP    - HEX or OCTAL dump of file(s) contents.
  62.            DUS     - Disk Usage Summary
  63.            EDT     - A screen oriented text editor.
  64.            EXTRACT - Extact a section from a larger file.
  65.            FDIR    - A screen oriented directory shell.
  66.            FSCAN   - Scan for altered files.
  67.            HEXED   - A screen oriented binary editor.
  68.            LOCATE  - Search for text strings.
  69.            OFF     - CRT screen saved.
  70.            RETAB   - Retabulate files to different tab stops.
  71.            SIZE    - Display size of file(s) in lines/characters.
  72.            TIMEIT  - Times the execution of another command.
  73.            TYPESET - An ASCII document formatter.
  74.            WDIR    - Walk a directory & execute commands.
  75.    
  76.          The following pages contain detailed descriptions of each  utility
  77.       program, and its operating syntax.
  78.    
  79.          The PCUTILS "package" (software and documentation) is copyrighted,
  80.       and may not be re-distributed for profit or other commercial purposes
  81.       without my written permission. If you  find  PCUTILS  useful,  please
  82.       help  me  continue  to  support  and  enhance   it   by   sending   a
  83.       "registration" fee of $24.95 to this address:
  84.    
  85.                           Dunfield Development Systems
  86.                           P.O. Box 31044
  87.                           Nepean, Ontario (Canada)
  88.                           K2B 8S8
  89.    
  90.          Please make your cheque  or  money  order  payable  to  "David  or
  91.       Sharleen Dunfield". If you choose not to order the  complete  PCUTILS
  92.       package, please discontinue using PCUTILS within thirty days.
  93.    
  94.          PCUTILS is provided on an "as is" basis, with no warranty  of  any
  95.       kind. In no event shall the author be liable for any damages  arising
  96.       from its use or distribution.
  97.    PC Utilities - CHATTR                                            Page: 2
  98.  
  99.  
  100.    2. CHATTR - Change file attributes
  101.    
  102.          CHATTR is a simple utility program which allows you to easily  set
  103.       the attribytes of DOS files.
  104.    
  105.          The form of the CHATTR command is:
  106.    
  107.                      CHATTR <filespec> <+|-attribute ...>
  108.    
  109.          The available attributes are:
  110.    
  111.    
  112.            +/-A    - Add/Remove ARCHIVE bit
  113.            +/-H    - Add/Remove HIDDEN bit
  114.            +/-R    - Add/Remove READ-ONLY bit
  115.            +/-S    - Add/Remove SYSTEM bit
  116.    
  117.          Examples:
  118.    
  119.            chattr *.* -a
  120.            chattr \dos\*.* +r
  121.            chattr C:\command.com +h +r
  122.    PC Utilities - DIFF                                              Page: 3
  123.  
  124.  
  125.    3. DIFF - A file compare program
  126.    
  127.          DIFF is a program which  taks  two  text  files,  and  performs  a
  128.       line-by-line comparison of them. If more than one differing  line  is
  129.       found, DIFF considers and reports this is a  single  difference.  The
  130.       'r=' parameter controls how many identical lines DIFF  must  find  in
  131.       the file before it considers a difference to be ended.
  132.    
  133.          Any time a difference is found between the  files,  DIFF  displays
  134.       the line numbers indicating where the difference occurs, followed  by
  135.       the differing lines from the first file (Preceeded by '<'),  and  the
  136.       differing lines from the second file (Precceded by '>').
  137.    
  138.          The form of the DIFF command is:
  139.    
  140.                       DIFF <file1> <file2> [options ...]
  141.    
  142.          The available options are:
  143.    
  144.            -d      - Inhibit display of differing lines
  145.            -l      - Inhibit display of line numbers
  146.            r=num   - Specify minimum # of lines to re-synchronize
  147.    
  148.          Examples:
  149.    
  150.            diff program.asm program.bak
  151.    PC Utilities - DR                                                Page: 4
  152.  
  153.  
  154.    4. DR - Date Ranger
  155.    
  156.          DR is a utility which will quickly scan a disk or  directory,  and
  157.       report on the oldest and newest files it finds. It  is  quite  useful
  158.       for determing the last date/time a change was made etc.
  159.    
  160.          The form of the DR command is:
  161.    
  162.                        DR <directory ...> [options ...]
  163.    
  164.          The available options are:
  165.    
  166.            -? or ? - Display help info.
  167.            -h      - Exclude HIDDEN files
  168.            -n      - Inhibit display of NEWest file
  169.            -o      - Inhibit display of OLDest file
  170.            -r      - Inhibit recursion into sub-directories
  171.            -s      - Exclude SYSTEM files
  172.            -v      - Inhibit startup message (header)
  173.    
  174.          Examples:
  175.    
  176.            dr c:\myprogs
  177.    PC Utilities - DUMP                                              Page: 5
  178.  
  179.  
  180.    5. DUMP - File dump
  181.    
  182.          DUMP is a utility which displays the contents of one or more files
  183.       in either HEX/ASCII or OCTAL/ASCII "dump" format. Wildcards (*,?) are
  184.       allowed in filenames.
  185.    
  186.          The form of the DUMP command is:
  187.    
  188.                       DUMP <filename ...> [options ...]
  189.    
  190.          The available options are:
  191.    
  192.            -f      - Pause between each file
  193.            -o      - Use OCTAL dump (default is HEX)
  194.            -p      - Pause between each block
  195.    
  196.          Examples:
  197.    
  198.            dump myprog.obj -p
  199.            dump *.COM -f -o
  200.    PC Utilities - DUS                                               Page: 6
  201.  
  202.  
  203.    6. DUS - Disk Use Summary
  204.    
  205.          The DUS utility scans a disk or directory tree, and reports on the
  206.       disk space used  within  each  subdirectory.  A  "Cumulative"  option
  207.       allows DUS to report the total  space  under  each  directory,  which
  208.       includes the contents of any subdirectories.
  209.    
  210.          The form of the DUS command is:
  211.    
  212.                       DUS <directory ...> [options ...]
  213.    
  214.          The available options are:
  215.    
  216.            -? or ? - Display help info.
  217.            -c      - Produce CUMULATIVE display
  218.            -d      - Inhibit individual display (total only)
  219.            -h      - Exclude HIDDEN files
  220.            -p      - Pause between each output page
  221.            -r      - Inhibit recursion into sub-directories
  222.            -s      - Exclude SYSTEM files
  223.            -v      - Inhibit startup message (header)
  224.    
  225.          Examples:
  226.    
  227.            dus c:\
  228.            dus c:\ d:\ -c
  229.            dus d:\archive -c
  230.    PC Utilities - EDT                                               Page: 7
  231.  
  232.  
  233.    7. EDT - Text editor
  234.    
  235.       7.1 Introduction
  236.    
  237.             EDT is a fully featured, in-memory, text editor. It operates in
  238.          either a line-by-line, or a visual screen format.
  239.    
  240.             In line-by-line mode, EDT performs no direct  screen  accesses,
  241.          and may be operated over a serial port using CTTY.
  242.    
  243.             EDT is invoked with the command 'EDT <filename>'. If the  named
  244.          file already exists, EDT will load and edit it, otherwise a  blank
  245.          file is presented. If the optional '-v'  qualifier  is  specified,
  246.          EDT will start-up in line-by-line mode, otherwise it starts up  in
  247.          visual mode.
  248.    
  249.                eg:     edt thefile.dat         <- Visual mode
  250.                        edt myfile.dat -v       <- Line by Line
  251.    PC Utilities - EDT                                               Page: 8
  252.  
  253.  
  254.       7.2 Line mode operation
  255.    
  256.          7.2.1 Line ranges
  257.    
  258.                Most commands accept a "line-range"  which  is  an  optional
  259.             specification controlling the range  of  lines  for  which  the
  260.             command  has  effect.  Unless  otherwise  stated,  the  default
  261.             line-range assumed for each command is the "current" line (*).
  262.    
  263.                The "current" line is the line at which EDT is positioned in
  264.             line by line mode, and is also the line on which the cursor  is
  265.             positioned in visual mode.
  266.    
  267.                The following are the valid line range formats:
  268.    
  269.                   *        - The "current" line
  270.                   /        - The entire file
  271.                   =        - The tagged lines
  272.                   0        - The end of the file
  273.                   <n>      - Line number <n>, (<n> >= 1)
  274.                   <r>,<r>  - Range between beginning of two other ranges.
  275.    
  276.                The '+' and '-' characters may be used to add or subtract  a
  277.             constant value from a line range.
  278.    
  279.                    eg: '0-12' <- 12 lines from end of file
  280.    
  281.                If '+' or '-' is used but no range is specified,  an  offset
  282.             from the current line is assumed.
  283.    
  284.                  eg: '+12' <- 12 lines from the current line.
  285.    
  286.                The  line  range  specification   is   entered   immediately
  287.             preceeding the command name.
  288.    
  289.                         ie: '<r><command> <operands>'
  290.    
  291.          7.2.2 Line mode commands
  292.             C - Copy text
  293.    
  294.                   The 'C'opy command performs a copy of the active range of
  295.                lines, placeing the copy directly ahead of the current line.
  296.    
  297.                Examples:
  298.    
  299.                    C               - Duplicate current line
  300.                    1,10C           - Copy lines 1 to 10 inclusive
  301.                    =C              - Copy tagged lines
  302.                    /C              - Duplicate entire file (must be at end)
  303.    PC Utilities - EDT                                               Page: 9
  304.  
  305.  
  306.             D - Delete text
  307.    
  308.                   The 'D'elete command deletes the active range of lines.
  309.    
  310.                Examples:
  311.    
  312.                    D               - Delete current line
  313.                    -5,+5D          - Delete 11 lines -5 to +5 from current
  314.                    /D              - Delete entire file
  315.    
  316.             F - File information
  317.    
  318.                   This command displays information about  the  file  being
  319.                edited, includes the filename, the size of the file in lines
  320.                and characters, and the size and position of  the  specified
  321.                line range.
  322.    
  323.                Examples:
  324.    
  325.                    F               - Display file & current line information
  326.                    =F              - Display file & tagged lines information
  327.    
  328.             I - Insert new text
  329.    
  330.                   The 'I'nsert command prompts for  'Input:',  and  inserts
  331.                all lines typed directly ahead of the active range. Enter  a
  332.                null line to exit.
  333.    
  334.                Examples:
  335.    
  336.                    I               - Insert ahead of current line
  337.                    /I              - Insert at start of file
  338.                    0I              - Insert at end of file
  339.    
  340.             L - List text in simple form
  341.    
  342.                   The 'L'ist command displays the active  range  of  lines.
  343.                The  display  does  not  include  line  numbers  or  special
  344.                indications.  'L'ist  is  faster  and  mode  efficent   that
  345.                'P'rint.
  346.    
  347.                Examples:
  348.    
  349.                    L               - List current line
  350.                    /L              - List entire file
  351.                    -10,+10L        - List 21 lines, centered on current
  352.    
  353.             M - Move text
  354.    
  355.                   The 'M'ove command moves the active range of lines to the
  356.                location directly ahead of the current line.
  357.    
  358.                Examples:
  359.    
  360.                    =M              - Move tagged lines
  361.                    +1M             - Interchange active & next line
  362.    PC Utilities - EDT                                               Page: 10
  363.  
  364.  
  365.             P - Print text (Enhanced 'L'ist)
  366.    
  367.                   The 'P'rint command displays the active range  of  lines.
  368.                This display includes the line number which may be  preceded
  369.                by a special indication flag ('*' for current line, '='  for
  370.                tagged lines).
  371.    
  372.                Examples:
  373.    
  374.                    P               - Display current line
  375.                    /P              - Display entire file
  376.    
  377.             Q - Quit (exit) editor
  378.    
  379.                   The 'Q'uit command exits the editor.  This  command  will
  380.                not allow an exit if unsaved  changes  are  present  in  the
  381.                file.
  382.    
  383.                Examples:
  384.    
  385.                    Q               - Quit editor
  386.    
  387.             QQ - Unconditional 'Q'uit
  388.    
  389.                   The 'QQ'uit command exits the editor unconditionaly.
  390.    
  391.                Examples:
  392.    
  393.                    QQ              - Quit unconditionaly.
  394.    
  395.             R <filename> - Read file
  396.    
  397.                   The 'R'ead command  reads  the  entire  contents  of  the
  398.                specified file, and inserts it directly ahead of the  active
  399.                range.
  400.    
  401.                Examples:
  402.    
  403.                    Rabc            - Insert file 'abc' at current
  404.                    /Rabc           - Insert file 'abc' at start
  405.                    0Rabc           - Append file 'abc' at end
  406.    
  407.             S<dc><search><dc><replace> - Substitute
  408.    
  409.                   The 'S'ubstitute command searches  the  active  range  of
  410.                lines, and replaces all occurrances of the  string  <search>
  411.                with the string <replace>. The <dc> delimiter character  may
  412.                be any character not contained within the <search> string.
  413.    
  414.                Examples:
  415.    
  416.                    S'abc'def       - Change 'abc' to 'def' in current
  417.                    /S'abc'def      - Change 'abc' to 'def' in entire file
  418.                    =S'abc'def      - Change 'abc' to 'def' in tagged lines
  419.    PC Utilities - EDT                                               Page: 11
  420.  
  421.  
  422.             T - Tag lines
  423.    
  424.                   The  'T'ag  command  tags  the  active  range  of  lines,
  425.                allowing them to be referred  to  by  '='  in  a  subsequent
  426.                command range.
  427.    
  428.                Examples:
  429.    
  430.                    T               - Tag current line
  431.                    1,10T           - Tag lines 1 to 10
  432.                    *,+5T           - Tag six lines starting at current
  433.    
  434.             V - Switch Visual Mode
  435.    
  436.                   The 'V' command causes EDT to switch visual  modes.  This
  437.                enters visual mode if EDT was previously  in  line  by  line
  438.                mode, and enters line by line mode if previously  in  visual
  439.                mode.
  440.    
  441.                Examples:
  442.    
  443.                    V               - Switch visual modes
  444.    
  445.             W [filename] - Write to file
  446.    
  447.                   The 'W' command writes the active range of lines  to  the
  448.                named file, or to the original file edited  if  no  name  is
  449.                specified. Use of this command also resets the FILE  CHANGED
  450.                flag, allowing exit via 'q'.
  451.    
  452.                   The default line range assumed for 'W'rite is the  entire
  453.                file.
  454.    
  455.                Examples:
  456.    
  457.                    W               - Write entire file
  458.                    *W              - Write current line
  459.                    Wabc            - Write entire file to 'abc'
  460.                    =Wabc           - Write tagged lines to 'abc'
  461.    
  462.             X [filename] - Write file and eXit
  463.    
  464.                   This command behaves  exactly  as  the  'W'rite  command,
  465.                followed immediatly by  a  'Q'uit  command.  It  provides  a
  466.                shorthand way of saving your file and leaving the editor.
  467.    
  468.                Examples:
  469.    
  470.                    X               - Write file & exit
  471.                    Xabc            - Write to 'abc' and exit
  472.    PC Utilities - EDT                                               Page: 12
  473.  
  474.  
  475.             ?<text> - Search for text
  476.    
  477.                   The '?' command  moves  the  active  line  to  the  first
  478.                occurance of the specified string within the active range.
  479.    
  480.                   The default range assumed for '?' is one  character  past
  481.                the current cursor position (in visual mode)  or  the  first
  482.                character of the active line (In line by line mode), through
  483.                to the end of the file.
  484.    
  485.                Examples:
  486.    
  487.                    ?string         - Find next occurance of "string"
  488.                    /?string        - Find first occurance of "string"
  489.    
  490.             $<command> - Execute DOS command
  491.    
  492.                   The '$' command executes the specified DOS command.
  493.    
  494.                Examples:
  495.    
  496.                    $dir            - Execute 'dir' command
  497.    
  498.             <no command> - Goto line
  499.    
  500.                   If a line range is given  without  a  command,  EDT  will
  501.                reposition the "current"  line  to  the  beginning  of  that
  502.                range.
  503.    
  504.                Examples:
  505.    
  506.                    100             - Move to line 100
  507.                    /               - Move to start of file
  508.                    0               - Move to end of file
  509.                    =               - Move to tagged line(s)
  510.    PC Utilities - EDT                                               Page: 13
  511.  
  512.  
  513.       7.3 Visual mode operation
  514.    
  515.             When in VISUAL mode, EDT presents  a  window  on  the  terminal
  516.          screen which displays the contents  of  a  section  of  the  file.
  517.          Editing of the file may be performed directly on  the  screen  via
  518.          special function keys, and the screen is updated so that  you  see
  519.          your changes as they are being performed.
  520.    
  521.             Any  control  characters  which  exist  in  the  file  will  be
  522.          displayed as the  corresponding  printable  character  in  reverse
  523.          video.
  524.    
  525.             If the end of the file is within the area shown on the  screen,
  526.          the message '*EOF*' is displayed in reverse video.
  527.    
  528.          7.3.1 Entering text
  529.    
  530.                Text may be entered into the file being  edited,  simply  by
  531.             typeing it at the terminal keyboard. EDT  automatically  places
  532.             the text in the file, and updates the screen to reflect the new
  533.             contents. The position of the  terminal  cursor  indicates  the
  534.             position at which the text will be entered.
  535.    
  536.          7.3.2 Positioning the cursor
  537.    
  538.                The arrow keys on the terminal  may  be  used  to  move  the
  539.             cursor around the displayed image. Moving beyond the bottom  of
  540.             the screen causes EDT to scroll forward one line, and shift the
  541.             screen up. Moving beyond the top of the screen  causes  EDT  to
  542.             scroll backward one half screen, and redisplay the text.
  543.    
  544.                EDT will perform sideways scrolling of the display to  allow
  545.             the cursor to access the entire width of lines which are larger
  546.             than 80 columns.
  547.    PC Utilities - EDT                                               Page: 14
  548.  
  549.  
  550.          7.3.3 Visual mode function keys
  551.    
  552.                The following keys on  the  IBM  PC  keyboard  have  special
  553.             meaning to EDT:
  554.    
  555.             Right arrow
  556.    
  557.                   Moves the cursor forward one  character  positon  in  the
  558.                file, if at the end of a line, the cursor  will  advance  to
  559.                the first position of the next line.
  560.    
  561.             Left arrow
  562.    
  563.                   Moves the cursor backward one character  positon  in  the
  564.                file, if at the beginning of a line, the cursor will  backup
  565.                to the last position of the previous line.
  566.    
  567.             Up arrow
  568.    
  569.                   Moves the cursor up one  line.  If  at  the  top  of  the
  570.                screen, the display will scroll  backwards  by  one  half  a
  571.                screen page.
  572.    
  573.             Down arrow
  574.    
  575.                   Moves the cursor down one line. If at the bottom  of  the
  576.                screen, the display will scroll forward by one line.
  577.    
  578.                   The cursor may appear to jump back and  forth  as  it  is
  579.                moved up and down, if it ancounters lines which are  shorter
  580.                than the current character  position  within  the  line,  or
  581.                lines which contain tabs. This is because whenever possible,
  582.                the cursor is  returned  to  the  same  number  of  physical
  583.                characters from the start of the line as is was on the first
  584.                line from which the UP or DOWN arrow was pressed.
  585.    
  586.             Page up
  587.    
  588.                   This key pages backward one  screen.  (Top  line  becomes
  589.                bottom)
  590.    
  591.             Page down
  592.    
  593.                   This key pages forward one screen. (Bottom  line  becomes
  594.                top)
  595.    
  596.             Home
  597.    
  598.                   Moves the cursor to the beginning of the line. If  it  is
  599.                already at the beginning of a  line,  it  is  moved  to  the
  600.                beginning of the previous line.
  601.    
  602.             End
  603.    
  604.                   Moves the cursor to the end of the line.  If  already  at
  605.                the end of a line, it is moved to the end of the next line.
  606.    PC Utilities - EDT                                               Page: 15
  607.  
  608.  
  609.             CTRL-PgUp
  610.    
  611.                   This key moves the cursor to the beginning of  the  first
  612.                line in the file.
  613.    
  614.             CTRL-PgDn
  615.    
  616.                   This key moves the cursor to the end of the file.
  617.    
  618.             CTRL-Right Arrow
  619.    
  620.                   Moves the cursor to the beginning of the next word.
  621.    
  622.             CTRL-Left Arrow
  623.    
  624.                   Moves the cursor to the beginning of the previous word.
  625.    
  626.             Ins
  627.    
  628.                   Toggles between character INSERT and OVERWRITE  mode.  In
  629.                INSERT mode,  all  characters  typed  at  the  terminal  are
  630.                inserted into the text. In OVERWRITE mode, only the  NEWLINE
  631.                character and data entered at the end of a line is inserted,
  632.                all other characters will overwrite the existing text.
  633.    
  634.             Delete
  635.    
  636.                   Deletes the character under the  cursor,  without  moving
  637.                the cursor.
  638.    
  639.             Backspace
  640.    
  641.                   Moves the cursor backward to the previous character, then
  642.                deletes that character.
  643.    
  644.             CTRL-Home
  645.    
  646.                   Redraws the screen image of the file.  This  is  normally
  647.                used in the case of  the  screen  being  corrupted  by  data
  648.                transmission  errors,  or  asynchronus  messages  from   the
  649.                operating system or its users.
  650.    
  651.             F1
  652.    
  653.                   Toggles ON/OFF the display of NEWLINE characters  at  the
  654.                end of each line of text.
  655.    
  656.             F2
  657.    
  658.                   Displays  the  current  cursor  position,  including  the
  659.                actual and character offsets from the start of line.
  660.    
  661.             F3
  662.    
  663.                   Brings the line the cursor  is  on  to  the  top  of  the
  664.                screen.
  665.    PC Utilities - EDT                                               Page: 16
  666.  
  667.  
  668.             F4
  669.    
  670.                   Tags one or more lines for a later operation. The  tagged
  671.                lines  are  displayed  in  special  video  if  the  terminal
  672.                supports it. Once one line is tagged, pressing this  key  on
  673.                another line causes all lines between  them  to  be  tagged.
  674.                Pressing it again on the first  line  of  the  tagged  range
  675.                removes the tags.
  676.    
  677.             F5
  678.    
  679.                   Deletes from the cursor position to the end of  the  line
  680.                (inclusive).
  681.    
  682.             F6
  683.    
  684.                   Deletes from the cursor position to the end of  the  line
  685.                (exclusive).
  686.    
  687.             F7
  688.    
  689.                   Inserts the deleted line text (From  Function  key  8  or
  690.                Function key 9) at the current cursor position.
  691.    
  692.             F10 or Keypad '+'
  693.    
  694.                   Prompts for a line mode command, and executes it. See the
  695.                section on line mode operation.
  696.    
  697.             F9 or Keypad '-'
  698.    
  699.                   Re-executes the last line mode command entered.
  700.    PC Utilities - EXTRACT                                           Page: 17
  701.  
  702.  
  703.    8. EXTRACT - Extract section of file
  704.    
  705.          The EXTRACT utility reads a file, and writes a specified range  of
  706.       lines to standard output, which can be re-directed  to  another  file
  707.       with the '>' operator. If the specified ending line number is  higher
  708.       than the number of lines in the file, all  lines  from  the  starting
  709.       line number to the end of the file will be written.
  710.    
  711.          The form of the EXTRACT command is:
  712.    
  713.                   EXTRACT <filename> <start line> <end line>
  714.    
  715.          Examples:
  716.    
  717.            extract bigfile.dat 1 1000 >small1.dat
  718.            extract bigfile.dat 1001 2000 >small2.dat
  719.            extract bigfile.dat 2001 9999 >small3.dat
  720.    PC Utilities - FDIR                                              Page: 18
  721.  
  722.  
  723.    9. FDIR - Full screen directory
  724.    
  725.       9.1 Introduction
  726.    
  727.             FDIR is a screen oriented directory utility, which  allows  the
  728.          entry and editing of commands into a console display of  directory
  729.          files. The directory  display  includes  the  filename,  the  file
  730.          owner, size (in Kbytes) and attributes.
  731.    
  732.       9.2 Command format
  733.    
  734.             The following characters have special significance when used as
  735.          part of the commands entered into the directory display:
  736.    
  737.            @   - Substitutes the entire filename and extension
  738.                  (without directory) into the command.
  739.    
  740.            $   - Substitutes the filename only (without directory
  741.                  or extension) into the command.
  742.    
  743.            ^   - Substitutes the directory path (no filename or
  744.                  extension into the command.
  745.    
  746.            !   - Protect the next character in the command from
  747.                  the above translations.
  748.    
  749.             If none of the above characters are found in a command, and the
  750.          F1 (filename) option flag is turned  on  (see  below),  FDIR  will
  751.          append the entire directory path, filename and  extension  to  the
  752.          command.
  753.    
  754.             For example, if you issued the command:
  755.    
  756.                                FDIR \cmds\*.EXE
  757.    
  758.             The following lines  would  result  in  the  indicated  command
  759.          executed if entered beside the name 'FDIR.EXE':
  760.    
  761.            echo            ===>    echo \cmds\FDIR.EXE
  762.            echo @          ===>    echo FDIR.EXE
  763.            echo $          ===>    echo FDIR
  764.            echo ^          ===>    echo \cmds\
  765.            echo !@         ===>    echo \cmds\FDIR.EXE
  766.            echo !^@        ===>    echo ^FDIR.EXE
  767.            echo !^         ===>    echo ^ FDIR.EXE
  768.            copy !@ @       ===>    copy \cmds\FDIR.EXE FDIR.EXE
  769.    PC Utilities - FDIR                                              Page: 19
  770.  
  771.  
  772.       9.3 Function keys
  773.    
  774.             FDIR recognizes and acts upon the following special keys:
  775.    
  776.          Right Arrow
  777.    
  778.                Moves the cursor one character  to  the  right,  within  the
  779.             field of the command being edited.
  780.    
  781.          Left Arrow
  782.    
  783.                Move the cursor one character to the left, within the  field
  784.             of the command being edited.
  785.    
  786.          Up Arrow
  787.    
  788.                Move the cursor up one line, to the previous command  field.
  789.             The screen will be paged backward through the directory display
  790.             if necessary.
  791.    
  792.          Down Arrow
  793.    
  794.                Move the cursor down one line, to the  next  command  field.
  795.             The screen will  be  scrolled  forward  through  the  directory
  796.             display if necessary.
  797.    
  798.          Page up
  799.    
  800.                This key pages backward one screen in the directory display.
  801.             (Top line becomes bottom)
  802.    
  803.          Page down
  804.    
  805.                This key pages forward one screen in the directory  display.
  806.             (Bottom line becomes top)
  807.    
  808.          Home
  809.    
  810.                Moves the cursor to the beginning of the command entry field
  811.             on this line.
  812.    
  813.          End
  814.    
  815.                Moves the cursor to the end of the command  entry  field  on
  816.             this line.
  817.    PC Utilities - FDIR                                              Page: 20
  818.  
  819.  
  820.          CTRL-PgUp
  821.    
  822.                This key positions  the  cursor  to  the  beginning  of  the
  823.             command entry field in the first file entry  in  the  directory
  824.             display.
  825.    
  826.          CTRL-PgDn
  827.    
  828.                This key positions  the  cursor  to  the  beginning  of  the
  829.             command entry field in the last file  entry  in  the  directory
  830.             display.
  831.    
  832.          CTRL-Home
  833.    
  834.                Redraws the screen image of the file. This is normally  used
  835.             in the case of the screen being corrupted by data  transmission
  836.             errors, or asynchronus messages from the  operating  system  or
  837.             its users.
  838.    
  839.          Ins
  840.    
  841.                Toggles between character  INSERT  and  OVERWRITE  mode.  In
  842.             INSERT mode, all characters typed at the terminal are  inserted
  843.             into the command. In OVERWRITE mode, characters typed overwrite
  844.             any data already present in the command field.
  845.    
  846.          Delete
  847.    
  848.                Deletes the character under the cursor, without  moving  the
  849.             cursor.
  850.    
  851.          Backspace
  852.    
  853.                Moves the cursor backward to the  previous  character,  then
  854.             deletes that character.
  855.    
  856.          F1
  857.    
  858.                Toggles ON/OFF the automatic insertion of filenames  at  the
  859.             end of commands.
  860.    
  861.          F2
  862.    
  863.                Toggles ON/OFF the display of the actual  commands  as  they
  864.             are executed.
  865.    
  866.          F3
  867.    
  868.                Toggles ON/OFF the  pause  prompt  after  all  commands  are
  869.             executed. If this option is not enabled,  the  screen  will  be
  870.             cleared, and the FDIR directory will be re-displayed immediatly
  871.             after the commands execute.
  872.    PC Utilities - FDIR                                              Page: 21
  873.  
  874.  
  875.          F10 or Keypad '+'
  876.    
  877.                This key causes FDIR to clear the screen, and execute all of
  878.             the  commands  which  have  been  entered  into  the  directory
  879.             display. If no commands are found, FDIR terminates.
  880.    
  881.          F11 or Keypad '-'
  882.    
  883.                This key causes FDIR to terminate immediatly.
  884.    PC Utilities - FSCAN                                             Page: 22
  885.  
  886.  
  887.    10. FSCAN - File Consistancy Scanner
  888.    
  889.       10.1 Introduction
  890.    
  891.             FSCAN is a utility for checking the consistancy of the files on
  892.          you disk, and warning you if any changes have occured. An  "INDEX"
  893.          file is maintained, in which the size and  CRC  of  all  files  is
  894.          recorded, allowing FSCAN to verify them at a later date.
  895.    
  896.       10.2 Command format
  897.    
  898.             The following options/commands may be given to FSCAN:
  899.    
  900.            +b      - Instructs FSCAN to keep a backup (.BAK) of
  901.                      the index file whenever it is updated.
  902.    
  903.            +d      - Instructs FSCAN to delete specified file
  904.                      records from the index file.
  905.    
  906.            i=name  - Specify an alternate index file.
  907.                      (Default is "\FSCAN.IDX")
  908.    
  909.            +l      - List the files records in the index file.
  910.    
  911.            +m      - Mark (update) the file records in the
  912.                      index file.
  913.    
  914.            -v      - Inhibit informational messages.
  915.    
  916.             Examples:
  917.    
  918.            fscan                   <== Check all files in index
  919.            fscan \dos              <== Check only \dos\*.*
  920.            fscan +m \dos           <== Record all files in \dos
  921.            fscan +d *.TMP          <== Remove temporary files
  922.            fscan +l                <== List files in index
  923.            fscan +l \cmds\*.exe    <== List only .EXE file in \cmds
  924.            fscan +m +b             <== Record and keep backup of index
  925.    PC Utilities - HEXED                                             Page: 23
  926.  
  927.  
  928.    11. HEXED - Binary editor
  929.    
  930.       11.1 Introduction
  931.    
  932.             HEXED is a screen oriented (window) editor, which allows you to
  933.          patch binary files in a HEX/ASCII DUMP display format.
  934.    
  935.             HEXED is invoked with the  command  "HEXED  <filename>",  where
  936.          <filename> is the name of an existing file.
  937.    
  938.             To patch the file, simply position the  cursor  over  the  byte
  939.          which you wish to change (using the special keys described below),
  940.          in either the HEXIDECIMAL or ASCII display windows, and enter  the
  941.          new value. Values in the HEXIDECIMAL window must be entered as two
  942.          (2) HEX/ASCII characters (0-9, A-F). Value in  the  ASCII  display
  943.          window may be entered by simply typing  ASCII  characters  on  the
  944.          keyboard.
  945.    
  946.       11.2 Function Keys
  947.    
  948.             HEXED recognizes the following special function keys:
  949.    
  950.          Right Arrow
  951.    
  952.                Advance the cursor position by one byte.
  953.    
  954.          Left arrow
  955.    
  956.                Backups the cursor position by one byte.
  957.    
  958.          Up Arrow
  959.    
  960.                Moves the cursor up one line (Back 16 bytes).
  961.    
  962.          Down Arrow
  963.    
  964.                Moves the cursor down one line (Forward 16 bytes).
  965.    
  966.          PgUp
  967.    
  968.                Displays the preceeding screen of data (backup 256 bytes).
  969.    
  970.          PgDn
  971.    
  972.                Displays the following screen of data (advance 256 bytes).
  973.    
  974.          Home
  975.    
  976.                Moves the cursor to the start of the line.
  977.    
  978.          End
  979.    
  980.                Moves the cursor to the end of the line.
  981.    PC Utilities - HEXED                                             Page: 24
  982.  
  983.  
  984.          CTRL-PgUp
  985.    
  986.                Displays the first page of data in the file,  and  positions
  987.             the cursor on the first byte.
  988.    
  989.          CTRL-PgDn
  990.    
  991.                Displays the last page of data in the  file,  and  positions
  992.             the cursor on the last byte.
  993.    
  994.          CTRL-Home
  995.    
  996.                Re-draw the screen.
  997.    
  998.          Ins
  999.    
  1000.                Insert a byte in the file. The value  under  the  cursor  is
  1001.             duplicated. All subsequent data is shifted down by one byte  to
  1002.             make room.
  1003.    
  1004.          Del
  1005.    
  1006.                Delete a byte from the file. The value under the  cursor  is
  1007.             removed. All subsequent data is shifted up by one byte to  fill
  1008.             in.
  1009.    
  1010.          F1
  1011.    
  1012.                Toggles the cursor between the HEXIDECIMAL and ASCII display
  1013.             windows, allowing data entry in either form.
  1014.    
  1015.          F10 or Keypad '+'
  1016.    
  1017.                Prompts for a command, and executes it.
  1018.    
  1019.          F9 or Keypad '-'
  1020.    
  1021.                Re-executes the last line mode command entered.
  1022.    PC Utilities - HEXED                                             Page: 25
  1023.  
  1024.  
  1025.       11.3 Commands
  1026.    
  1027.             HEXED recognizes the following commands:
  1028.    
  1029.          G <xxxx> - Goto position
  1030.    
  1031.                Positions the display to begin at specified address (xxxx).
  1032.    
  1033.             Examples:
  1034.    
  1035.                    g100            - Position to 0100
  1036.                    g1000           - Position to 1000
  1037.    
  1038.          Q - Quit (exit) editor
  1039.    
  1040.                The 'Q'uit command exits the editor. This command  will  not
  1041.             allow an exit if unsaved changes are present in the file.
  1042.    
  1043.             Examples:
  1044.    
  1045.                    Q               - Quit editor
  1046.    
  1047.          QQ - Unconditional 'Q'uit
  1048.    
  1049.                The 'QQ'uit command exits the editor unconditionaly.
  1050.    
  1051.             Examples:
  1052.    
  1053.                    QQ              - Quit unconditionaly.
  1054.    
  1055.          W [filename] - Write to file
  1056.    
  1057.                The 'W' command writes the contents of the  edit  buffer  to
  1058.             the named file, or to the original file edited if  no  name  is
  1059.             specified. Use of this command also  resets  the  FILE  CHANGED
  1060.             flag, allowing exit via 'q'.
  1061.    
  1062.             Examples:
  1063.    
  1064.                    W               - Write file
  1065.                    Wabc            - Write file to 'abc'
  1066.    
  1067.          X [filename] - Write file and eXit
  1068.    
  1069.                This  command  behaves  exactly  as  the  'W'rite   command,
  1070.             followed  immediatly  by  a  'Q'uit  command.  It  provides   a
  1071.             shorthand way of saving your file and leaving the editor.
  1072.    
  1073.             Examples:
  1074.    
  1075.                    X               - Write file & exit
  1076.                    Xabc            - Write to 'abc' and exit
  1077.    PC Utilities - HEXED                                             Page: 26
  1078.  
  1079.  
  1080.          ?<xx> <xx> ... - HEX search
  1081.    
  1082.                This  command  searches  for  the  specified   sequence   of
  1083.             hexidecimal values, beginning at the byte following the  cursor
  1084.             position.
  1085.    
  1086.             Examples:
  1087.    
  1088.                    ?01 02 03       - Search for bytes
  1089.    
  1090.          /<text> - ASCII search
  1091.    
  1092.                This command searches for the specified text string of ASCII
  1093.             values, beginning at the byte following the cursor position.
  1094.    
  1095.             Examples
  1096.    
  1097.                    /dave           - Search for text
  1098.    PC Utilities - LOCATE                                            Page: 27
  1099.  
  1100.  
  1101.    12. LOCATE - Text file search
  1102.    
  1103.          LOCATE is a fast utility for finding  specified  strings  in  text
  1104.       files. Unlike most other such utilities, LOCATE allows you to  search
  1105.       for several strings at the same time.
  1106.    
  1107.          The format of the LOCATE command is:
  1108.    
  1109.                   LOCATE <filespec> "text"... [options ...]
  1110.    
  1111.          The available options are:
  1112.    
  1113.            +c      - Use CASE-SENSITIVE search
  1114.            +r      - Recurse into SUB-DIRECTORIES
  1115.            +t      - Display lines where text is found
  1116.            -v      - Inhibit line number display
  1117.    
  1118.          Examples:
  1119.    
  1120.            locate *.c "printf" "svanf"
  1121.            locate C:\*.c "strcpy" +r
  1122.    PC Utilities - OFF                                               Page: 28
  1123.  
  1124.  
  1125.    13. OFF - CRT screen Saver
  1126.    
  1127.          OFF is a manually operated CRT screen saved.  When  executed,  OFF
  1128.       saves the current contents of the CRT screen,  clears  it,  and  then
  1129.       displays a "happy face" character which moves around at random.  This
  1130.       saves the  phosphors  of  the  CRT  from  becoming  "burned"  due  to
  1131.       characters being displayed in one position for too long. Pressing any
  1132.       key will restore the saved CRT screen, and terminate OFF.
  1133.    
  1134.          The form of the OFF command is:
  1135.    
  1136.                                      OFF
  1137.    
  1138.          This command should be executed whenever you are going to be  away
  1139.       from your computer for any length of time.
  1140.    PC Utilities - RETAB                                             Page: 29
  1141.  
  1142.  
  1143.    14. RETAB - File Re-Tabulator
  1144.    
  1145.       14.1 Introduction
  1146.    
  1147.             RETAB is a very useful utility  which  re-tabulates  files,  so
  1148.          that they will be correctly formatted when viewed on systems using
  1149.          different tab stops. RETAB writes its output to the console, which
  1150.          may be re-directed to a file using the DOS '>' operation.
  1151.    
  1152.             This is very useful  when  moving  files  from  one  system  to
  1153.          another (For example: QNX uses tabs every four spaces, and  MS-DOS
  1154.          uses tabs every 8 spaces).
  1155.    
  1156.       14.2 Command format
  1157.    
  1158.             The format of the RETAB command is:
  1159.    
  1160.           RETAB [options] <filename> [options <filename>]... >output
  1161.    
  1162.             The available options are:
  1163.    
  1164.            -f      - Inhibit filling with spaces. If this option is
  1165.                      specified, RETAB will only format the file as
  1166.                      close to the original format as it can using the
  1167.                      output tab stops only. If not specified, RETAB
  1168.                      will format the file to exactly the same visual
  1169.                      format, using spaces to fill in any partial tabs.
  1170.    
  1171.            -s      - Causes RETAB to convert any strings of spaces in
  1172.                      the input file to tabs where possible.
  1173.    
  1174.            i=n,... - Specifies the input file tab stops.
  1175.    
  1176.            o=n,... - Specifies the output file tab stops.
  1177.    
  1178.        NOTE: RETAB processes multiple files, and allows the tab settings
  1179.    to be defined for each file. The '-f -s i= and o=' parameters must be
  1180.    specified BEFORE the file name where they are to have effect.
  1181.    
  1182.        If more tabs are present in the input or output file than were specified
  1183.    (using I= and O=), RETAB assumes that the tabs continue at the spacing of
  1184.    the last two stops. Therefore, if the tabs are at regular intervals, only
  1185.    the first tab stop need be given.
  1186.    
  1187.        Both input and output tabs default to 8 space intervals.
  1188.    
  1189.        If 'O=0' is specified, RETAB will convert all tabs in the input file to
  1190.    the appriopriate number of spaces in the output file.
  1191.    
  1192.        Examples:
  1193.    
  1194.            retab i=4 tab4.fil >tab8.fil
  1195.            retab o=4 tab8.fil >tab4.fil
  1196.            retab i=4 o=2 tab4.file i=8 tab8.fil >tab2.fil
  1197.            retab o=0 tab8.file >space.fil
  1198.    PC Utilities - SIZE                                              Page: 30
  1199.  
  1200.  
  1201.    15. SIZE - Report file sizes
  1202.    
  1203.          The SIZE utility reads one or more files, and counts the number of
  1204.       lines and characters in each one.
  1205.    
  1206.          If no files are specified, SIZE reads from  the  "standard  input"
  1207.       device, allowing it to be used in a "pipe" to process the output from
  1208.       another command.
  1209.    
  1210.          If more than one filename is specified, SIZE will  also  report  a
  1211.       "grand  total"  of  the  total  numbers  of  lines   and   characters
  1212.       encountered.
  1213.    
  1214.          The form of the SIZE command is:
  1215.    
  1216.                              SIZE [filename ...]
  1217.    
  1218.          Examples:
  1219.    
  1220.            size textfile.dat
  1221.            size file1.txt file2.txt
  1222.            dir | size
  1223.    PC Utilities - TIMEIT                                            Page: 31
  1224.  
  1225.  
  1226.    16. TIMEIT - Time Command Execution
  1227.    
  1228.          TIMEIT executes another DOS command, and  reports  the  amount  of
  1229.       time taken to execute it. The elapsed  time  is  reported  in  hours,
  1230.       minites, seconds and hundredths of a second.
  1231.    
  1232.          The form of the TIMEIT command is:
  1233.    
  1234.                                TIMEIT <command>
  1235.    
  1236.          Examples:
  1237.    
  1238.            timeit cc myprog
  1239.            timeit dus d:\
  1240.    PC Utilities - WDIR                                              Page: 32
  1241.  
  1242.  
  1243.    17. WDIR - Walk Directory
  1244.    
  1245.       17.1 Introduction
  1246.    
  1247.             This utility walks through a directory, executing one  or  more
  1248.          commands on files matching a specified pattern. Its main use is to
  1249.          provide "wildcard" capability to commands which  do  not  directly
  1250.          support wildcards, although  it  can  be  quite  useful  in  other
  1251.          situations as well.
  1252.    
  1253.       17.2 Command format
  1254.    
  1255.             The format of the WDIR command is:
  1256.    
  1257.                     WDIR <filespec> "command..." [options]
  1258.    
  1259.             The following options are available:
  1260.    
  1261.            +r      - Recurse into sub-directories. When this option
  1262.                      is specified, WDIR will search sub-directories
  1263.                      for matching files.
  1264.    
  1265.            -v      - Inhibit display of commands executed.
  1266.    
  1267.            +m      - Use multiple (wildcard) forms of commands.
  1268.                      This options is used with '+r' to cause a
  1269.                      single command to be executed once in all
  1270.                      sub-directories that have matching files.
  1271.    
  1272.             The following characters have special significance when used as
  1273.          part of the commands given to WDIR.
  1274.    
  1275.            @   - Substitutes the entire filename and extension
  1276.                  (without directory) into the command.
  1277.    
  1278.            $   - Substitutes the filename only (without directory
  1279.                  or extension) into the command.
  1280.    
  1281.            ^   - Substitutes the directory path (no filename or
  1282.                  extension into the command.
  1283.    
  1284.            !   - Protect the next character in the command from
  1285.                  the above translations.
  1286.    
  1287.             If none of the above characters are found in  a  command,  WDIR
  1288.          will append the entire directory path, filename and  extension  to
  1289.          the command.
  1290.    
  1291.             NOTE: WDIR accepts and executes multiple commands.
  1292.    
  1293.             Examples:
  1294.    
  1295.            WDIR *.c "del" +r           <=== One "DEL" for each FILE
  1296.            WDIR *.c "del" +r +m        <=== One "DEL" for each DIRECTORY
  1297.            WDIR \cmds\*.BAT "copy" "delete"
  1298.            (Copy all ".BAT" files from \cmds and then delete them)
  1299.  
  1300.  
  1301.  
  1302.                                  PC Utilities
  1303.  
  1304.                               TABLE OF CONTENTS
  1305.  
  1306.  
  1307.                                                                         Page
  1308.  
  1309.     1. INTRODUCTION                                                        1
  1310.  
  1311.  
  1312.     2. CHATTR - Change file attributes                                     2
  1313.  
  1314.  
  1315.     3. DIFF - A file compare program                                       3
  1316.  
  1317.  
  1318.     4. DR - Date Ranger                                                    4
  1319.  
  1320.  
  1321.     5. DUMP - File dump                                                    5
  1322.  
  1323.  
  1324.     6. DUS - Disk Use Summary                                              6
  1325.  
  1326.  
  1327.     7. EDT - Text editor                                                   7
  1328.  
  1329.        7.1 Introduction                                                    7
  1330.        7.2 Line mode operation                                             8
  1331.        7.3 Visual mode operation                                          13
  1332.  
  1333.     8. EXTRACT - Extract section of file                                  17
  1334.  
  1335.  
  1336.     9. FDIR - Full screen directory                                       18
  1337.  
  1338.        9.1 Introduction                                                   18
  1339.        9.2 Command format                                                 18
  1340.        9.3 Function keys                                                  19
  1341.  
  1342.     10. FSCAN - File Consistancy Scanner                                  22
  1343.  
  1344.        10.1 Introduction                                                  22
  1345.        10.2 Command format                                                22
  1346.  
  1347.     11. HEXED - Binary editor                                             23
  1348.  
  1349.        11.1 Introduction                                                  23
  1350.        11.2 Function Keys                                                 23
  1351.        11.3 Commands                                                      25
  1352.  
  1353.     12. LOCATE - Text file search                                         27
  1354.  
  1355.  
  1356.  
  1357.    PC Utilities                                           Table of Contents
  1358.  
  1359.                                                                         Page
  1360.     13. OFF - CRT screen Saver                                            28
  1361.  
  1362.  
  1363.     14. RETAB - File Re-Tabulator                                         29
  1364.  
  1365.        14.1 Introduction                                                  29
  1366.        14.2 Command format                                                29
  1367.  
  1368.     15. SIZE - Report file sizes                                          30
  1369.  
  1370.  
  1371.     16. TIMEIT - Time Command Execution                                   31
  1372.  
  1373.  
  1374.     17. WDIR - Walk Directory                                             32
  1375.  
  1376.        17.1 Introduction                                                  32
  1377.        17.2 Command format                                                32
  1378.